home *** CD-ROM | disk | FTP | other *** search
-
-
- #ifndef __QUICKDRAW3DSUPPORT__
- #define __QUICKDRAW3DSUPPORT__
-
- // QuickDraw 3D stuff
- #include "QD3D.h"
- #include "QD3DGroup.h"
- #include "QD3DErrors.h"
- #include "QD3DView.h"
-
-
- #include "WindowObj.h"
-
-
- enum {
- iWF = 1,
- iCTSW = 3,
- iCTHW
- };
-
- enum {
- iFlat = 1,
- iVertex,
- iPixel
- } ;
-
-
- struct _documentRecord {
- TQ3ShaderObject fShader ; // illumination shader for the object
- TQ3ViewObject fView ; // the view for the scene
- TQ3GroupObject fModel ; // object in the scene being modelled
- TQ3StyleObject fInterpolation ; // interpolation style used when rendering
- TQ3StyleObject fBackFacing ; // whether to draw shapes that face away from the camera
- TQ3StyleObject fFillStyle ; // whether drawn as solid filled object or decomposed to components
- TQ3Matrix4x4 fRotation; // the transform for the model
- TQ3Point3D fGroupCenter ; // the center of the group (for rotation)
- float fGroupScale ; // scaling factor to apply before drawing
- TQ3InterpolationStyle fCurrentInterpolation; // the current interpolation style for the main group
- };
-
- typedef struct _documentRecord DocumentRec, *DocumentPtr, **DocumentHdl;
-
- void InitQuickDraw3DSupport(void);
- void TeardownQuickDraw3DSupport(void);
-
- DocumentHdl GetDocumentHdl(WindowObjHndl obj);
- DocumentHdl CreateDocument(WindowPtr win);
- void InitDocumentData(WindowPtr, DocumentHdl);
- void DisposeDocumentData(DocumentHdl);
-
- void SetWindowGeometry( WindowPtr win, short item );
- void SetWindowRenderer( WindowPtr win, short item );
- void SetWindowShading( WindowPtr win, short item ) ;
-
- TQ3ViewObject MyNewView(WindowPtr theWindow) ;
- TQ3DrawContextObject MyNewDrawContext( WindowPtr theWindow) ;
- TQ3CameraObject MyNewCamera(WindowPtr theWindow) ;
- TQ3GroupObject MyNewLights(void) ;
- TQ3GroupObject MyNewModelFromFile(FSSpec *theFileSpec) ;
-
- TQ3Status SubmitScene(DocumentHdl theDocument);
- TQ3Point3D AdjustCamera(DocumentHdl theDocument, short winWidth, short winHeight);
-
- #endif